// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLLimit;
// import com.alibaba.druid.sql.ast.SQLName;
// import com.alibaba.druid.sql.ast.SQLOrderBy;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

#include "MySqlShowDatabaseStatusStatement.h"
#include "../../../../ast/SQLExpr.h"
#include "../../../../ast/SQLLimit.h"
#include "../../../../ast/SQLName.h"
#include "../../../../ast/SQLOrderBy.h"
#include "../../visitor/MySqlASTVisitor.h"

SQLLimit_ptr MySqlShowDatabaseStatusStatement::getLimit()
{
  return limit;
}

void MySqlShowDatabaseStatusStatement::setLimit(SQLLimit_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlShowDatabaseStatusStatement));
  }
  this->limit = x;
}

SQLOrderBy_ptr MySqlShowDatabaseStatusStatement::getOrderBy()
{
  return orderBy;
}

void MySqlShowDatabaseStatusStatement::setOrderBy(SQLOrderBy_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlShowDatabaseStatusStatement));
  }
  this->orderBy = x;
}

SQLExpr_ptr MySqlShowDatabaseStatusStatement::getWhere()
{
  return where;
}

void MySqlShowDatabaseStatusStatement::setWhere(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlShowDatabaseStatusStatement));
  }
  this->where = x;
}

SQLName_ptr MySqlShowDatabaseStatusStatement::getName()
{
  return name;
}

void MySqlShowDatabaseStatusStatement::setName(SQLName_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(MySqlShowDatabaseStatusStatement));
  }
  this->name = x;
}

void MySqlShowDatabaseStatusStatement::accept0(MySqlASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(MySqlShowDatabaseStatusStatement)))
  {
    acceptChild(visitor, name);
    acceptChild(visitor, where);
    acceptChild(visitor, orderBy);
    acceptChild(visitor, limit);
  }
  visitor->endVisit(SharedObject(MySqlShowDatabaseStatusStatement));
}

BOOL_ptr MySqlShowDatabaseStatusStatement::isFull()
{
  return full;
}

void MySqlShowDatabaseStatusStatement::setFull(BOOL_ptr full)
{
  this->full = full;
}
